package demo5;

public class Dog extends Animal{
    //父类里面没有的属性，是属于子类的独特的属性
    public int velocity;
    @Override
    public void eat() {
        System.out.println("Dog is eating");
    }

    @Override
    public void sleep() {
        System.out.println("Dog is sleeping");
    }
//    public Dog(int age, String name) {
//        super(age,name);
//    }
    public Dog() {

    }

    @Override
    public String toString() {
        return "Dog{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }
}
